﻿CREATE TABLE [account].[BalanceSheetMHSC] (
    [AccountUId]                    INT                 NOT NULL,
    [AccountId]                     SMALLINT            NOT NULL,
    [AccountCode]                   VARCHAR (8)         NOT NULL,
    [AccountName]                   VARCHAR (100)       NOT NULL,
    [AccountType]                   CHAR (1)            NOT NULL,
    [AccountBalanceType]            CHAR (1)            NULL,
    [AccountCateryCode]             CHAR (3)            NOT NULL,
    [AccountCateryName]             VARCHAR (50)        NOT NULL,
    [AccountMappingPath]            [sys].[hierarchyid] NOT NULL,
    [AccountMappingLevel]           BIGINT              NOT NULL,
    [AccountMappingStartDate]       DATE                NOT NULL,
    [AccountMappingEndDate]         DATE                NOT NULL,
    [AccountOrderBy]                INT                 NOT NULL,
    [IsLatest]                      BIT                 NOT NULL,
    [IsActive]                      BIT                 NOT NULL,
    [IsInternal]                    BIT                 NOT NULL,
    [BalanceSheetTypeMHSCUId]       INT                 NOT NULL,
    [BalanceSheetTypeMHSCId]        SMALLINT            NOT NULL,
    [BalanceSheetTypeMHSCCode]      VARCHAR (8)         NULL,
    [BalanceSheetTypeMHSCName]      VARCHAR (100)       NULL,
    [BalanceSheetTypeMHSCOrderBy]   INT                 NOT NULL,
    [BalanceSheetDetailMHSCUId]     INT                 NULL,
    [BalanceSheetDetailMHSCId]      SMALLINT            NULL,
    [BalanceSheetDetailMHSCCode]    VARCHAR (8)         NULL,
    [BalanceSheetDetailMHSCName]    VARCHAR (100)       NULL,
    [BalanceSheetDetailMHSCOrderBy] INT                 NULL,
    [SubAccountUId]                 INT                 NULL,
    [SubAccountId]                  SMALLINT            NULL,
    [SubAccountCode]                VARCHAR (8)         NULL,
    [SubAccountName]                VARCHAR (100)       NULL,
    [SubAccountOrderBy]             INT                 NULL,
    PRIMARY KEY CLUSTERED ([AccountUId] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF)
);

